package org.skycloud.mybatis.pagination;

import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;

public final class PaginatedListHandler<T> implements ResultHandler {

	private PaginatedList<T> paginatedList;

	@Override
	@SuppressWarnings("unchecked")
	public void handleResult(ResultContext resultContext) {
		paginatedList = (PaginatedList<T>) resultContext.getResultObject();
	}

	public PaginatedList<T> getPaginatedList() {
		return paginatedList;
	}
}
